const reqeust = function(url, data, method = "GET") {
	uni.showLoading({
		title: "正在加载..."
	})
	return new Promise((resolve, rejedt) => {
		uni.request({
			url,
			data: data || {},
			method,
			success: (res) => {
				resolve(res)
			},
			fail: (err) => {
				resolve(err)
			},
			complete: () => {
				uni.hideLoading()
			}
		})
	})
}

uni.$get=function(url,data)
{
	return reqeust(url,data,"GET")
}

uni.$post=function(url,data)
{
	return reqeust(url,data,"POST")
}